﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI.Selection;

namespace HYLightingEquipmentLay
{
	public class AnyOneElementFilter : ISelectionFilter
	{
		public bool AllowElement(Element elem)
		{
			return elem.Category.Id.IntegerValue == this.m_nCategory && !(elem is Autodesk.Revit.DB.ElementType);
		}

		public bool AllowReference(Reference reference, XYZ position)
		{
			return false;
		}

		public AnyOneElementFilter(int nCategory)
		{
			this.m_nCategory = nCategory;
		}

		private int m_nCategory;
	}
}
